package com.example.library.mapper;

import com.example.library.model.UserInfo;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: asus
 * Date: 2024-12-20
 * Time: 16:54
 */
@Mapper
public interface UserInfoMapper {
    @Select("select * from user_info where user_name=#{name}")
    UserInfo selectUserByName(String name);

    @Insert("insert into user_info (user_name, password) values (#{userName}, #{password})")
    Integer insertUserInfo(UserInfo userInfo);
}
